package com.cykj.v_m_sprintboot.serviceImpl;

import com.cykj.v_m_sprintboot.bean.PageInf;
import com.cykj.v_m_sprintboot.bean.TbWarehouse;
import com.cykj.v_m_sprintboot.mapper.TbWarehouseMapper;
import com.cykj.v_m_sprintboot.service.TbWarehouseService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TbWarehouseServiceImpl implements TbWarehouseService {
    @Autowired
    private TbWarehouseMapper tbWarehouseMapper;
    @Override
    public boolean addWarehouse(TbWarehouse tbWarehouse) {
        return tbWarehouseMapper.addWarehouse(tbWarehouse);
    }

    @Override
    public TbWarehouse judgeWarehouse(TbWarehouse tbWarehouse) {
        return tbWarehouseMapper.judgeWarehouse(tbWarehouse);
    }

    @Override
    public List<TbWarehouse> getWarehouseList(PageInf pageInf, RowBounds rowBounds) {
        return tbWarehouseMapper.getWarehouseList(pageInf,rowBounds);
    }

    @Override
    public int count(PageInf pageInf) {
        return tbWarehouseMapper.count(pageInf);
    }

    @Override
    public boolean delWarehouse(int warehouseId,int warehouseStateId) {
        return tbWarehouseMapper.delWarehouse(warehouseId,warehouseStateId);
    }

    @Override
    public boolean updateWarehouse(TbWarehouse tbWarehouse) {
        return tbWarehouseMapper.updateWarehouse(tbWarehouse);
    }

    @Override
    public TbWarehouse judgeWarehouseName(TbWarehouse tbWarehouse) {
        return tbWarehouseMapper.judgeWarehouseName(tbWarehouse);
    }
}
